<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLogVipsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('log_vips', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id')->comment('服务器id');
            $table->integer('recipient_type')->default('1')->comment('类型：1:所有0指定');
            $table->string('recipients')->comment('收件人');
            $table->text('content')->comment('邮件内容');
            $table->unsignedInteger('integral_num')->comment('积分数量')->default(0);
            $table->unsignedInteger('fairy_num')->comment('仙晶数量')->default(0);
            $table->tinyInteger('add_type')->comment('0内部添加,1外部api添加');
            $table->string('level_section', 100)->nullable()->comment('等级区间');
            $table->dateTime('exp_time')->nullable()->comment('过期时间');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('log_vips');
    }
}
